import {TableColumns} from "@/components/layout/table/table-columns";

export const searchColumns = [
  {
    type: 'number',
    label: '序号',
    align: 'center',
    name: 'number',
  },
  {
    label: '设备名称',
    align: 'center',
    name: 'deviceName',
  },
  {
    label: '设备编码',
    align: 'center',
    name: 'deviceCode',
  },
  {
    label: 'SN码',
    align: 'center',
    name: 'sn',
  },
  {
    label: '设备类型',
    align: 'center',
    name: 'constName',
  },
  {
    type: 'format',
    label: '绑定状态',
    align: 'center',
    name: 'bindStatus',
    width: 100,
    value: [{label: '未绑定', value: 0}, {label: '已绑定', value: 1}]
  },
  {
    label: '操作',
    type: 'custom',
    align: 'center',
    buttons: [{method: 'choice', text: '选择'}]
  },
]
/**
 * 设备列表
 */
export const deviceColumns: TableColumns[] = [
  {
    type: 'number',
    label: '序号',
    align: 'center',
    name: 'number',
  },
  {
    label: '设备名称',
    align: 'center',
    name: 'deviceName',
  },
  {
    label: '设备编码',
    align: 'center',
    name: 'deviceCode',
  },
  {
    label: 'SN编码',
    align: 'center',
    name: 'sn',
  },
  {
    label: '设备类型',
    align: 'center',
    name: 'constName',
  },
  {
    type: 'format',
    label: '生命周期状态',
    align: 'center',
    name: 'status',
    width: 120,
    value: [
      {label: '未开通', value: 0},
      {label: '已开通', value: 1},
      {label: '已停用', value: 2},
      {label: '已回收', value: 3},
      {label: '已报废', value: 4}
    ]
  },
  {
    type: 'format',
    label: '在离线状态',
    align: 'center',
    name: 'deviceStatus',
    width: 100,
    value: [{label: '在线', value: 0}, {label: '离线', value: 1}]
  },
  {
    type: 'format',
    label: '当前状态',
    align: 'center',
    name: 'bindStatus',
    width: 100,
    value: [{label: '未绑定', value: 0}, {label: '已绑定', value: 1}]
  },
  {
    label: '最后通讯时间',
    align: 'center',
    name: 'lastDataTime',
    width: 160
  },
  {
    label: '操作',
    type: 'custom',
    align: 'center',
    buttons: [{method: 'see', text: '查看'}]
  },
]

export const deviceDetailsColumns: TableColumns[] = [
  {
    label: '设备名称',
    align: 'center',
    name: 'deviceName',
    width: 300
  },
  {
    label: '设备编码',
    align: 'center',
    name: 'deviceCode',
    width: 300
  },
  {
    label: 'SN编码',
    align: 'center',
    name: 'sn',
    width: 300
  },
  {
    label: '设备类型',
    align: 'center',
    name: 'constName',
    width: 300
  },
]
export const deviceChildrenColumns: TableColumns[] = [
  {
    label: '设备名称',
    align: 'center',
    name: 'deviceName',
    width: 300
  },
  {
    label: '设备编码',
    align: 'center',
    name: 'deviceCode',
    width: 300
  },
  {
    label: 'SN编码',
    align: 'center',
    name: 'sn',
    width: 300
  },
  {
    label: '设备类型',
    align: 'center',
    name: 'constName',
    width: 300
  },
]

export const deviceRepairColumns: TableColumns[] = [
  {
    type: 'number',
    label: '序号',
    align: 'center',
    name: 'number',
  },
  {
    label: '维修开始时间',
    align: 'center',
    name: 'addTime',
    width: 300
  },
  {
    label: '维修结束时间',
    align: 'center',
    name: 'editTime',
    width: 300
  },
  {
    label: '维修单',
    align: 'center',
    name: 'repairDoc',
    width: 300
  },
  {
    label: '维修说明',
    align: 'center',
    name: 'remark',
    width: 300
  },
]